package com.woniuxy.handler;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.woniuxy.pojo.Member;
import com.woniuxy.pojo.Offline;
import com.woniuxy.pojo.Room;
import com.woniuxy.service.MemberService;
import com.woniuxy.service.OfflineService;
import com.woniuxy.service.RoomService;

@Controller
@RequestMapping("/offline")
public class OfflineHandler{
	
	@Resource
	private OfflineService offlineService;
	
	@Resource
	private MemberService memberService; 
	
	@Resource
	private RoomService roomService;
	
	@RequestMapping("/order")
	public String order(Offline offline){
		String[] names = offline.getName();
		

		return "";
	}
	
	@RequestMapping("/findMember")
	@ResponseBody
	public List<Member> findMember(String message){	
		return memberService.findMember(message);
	}
	
	@RequestMapping("/findRoom")
	public List<Room> findRoom(String roomType){
		return roomService.findByType(roomType);
	}

}
